package ooo.reindeer.logging;

import java.util.Arrays;

public class LoggingMsg {

    String level;
    String loggerName;
    String threadName;
    String message;
    Object[] argArray;
    long timeStamp;
    Throwable throwable;

    public LoggingMsg(String level, String loggerName, String threadName, String message, Object[] argArray, Throwable throwable) {
        this.level = level;
        this.loggerName = loggerName;
        this.threadName = threadName;
        this.message = message;
        this.argArray = argArray;
        this.throwable = throwable;
        timeStamp = System.currentTimeMillis();
    }

    public Object[] getArgArray() {
        return argArray;
    }

    public String getLevel() {
        return level;
    }

    public String getLoggerName() {
        return loggerName;
    }

    public String getMessage() {
        return message;
    }

    public String getThreadName() {
        return threadName;
    }

    public Throwable getThrowable() {
        return throwable;
    }

    public long getTimeStamp() {
        return timeStamp;
    }

    @Override
    public String toString() {
        return "LoggingMsg{" +
                "level='" + level + '\'' +
                ", loggerName='" + loggerName + '\'' +
                ", threadName='" + threadName + '\'' +
                ", message='" + message + '\'' +
                ", argArray=" + Arrays.toString(argArray) +
                ", timeStamp=" + timeStamp +
                ", throwable=" + throwable +
                '}';
    }
}
